<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['prefix' => 'labaicai', 'namespace' => 'Labaicai'], function () {

    Route::get('categories/create-category', 'CategoryController@createCategory');
    Route::get('categories/update-category', 'CategoryController@updateCategory');
    Route::get('categories/delete-category', 'CategoryController@deleteCategory');
    Route::get('categories/restore', 'CategoryController@restore');
    Route::post('food/addDiet', 'FooodsController@addDiet');
    Route::resource('food', 'FooodsController');
    Route::resource('categories', 'CategoryController');
    Route::resource('food_categories', 'FooodCategoriesController');
    Route::get('me/articles/{id}', 'MeController@articles');
    Route::get('me/get/{id}', 'MeController@get');
    Route::resource('me', 'MeController');
    Route::get('user/get/{id}', 'UserController@get');
    Route::resource('user', 'UserController');

    Route::get('carbon', 'CarbonController@index');
    Route::get('today', 'TodayController@index');
    Route::get('/{page}', 'SinglePageController')
        ->name('page')
        ->where('page', 'about|contact|term');
});
